import request from '/@/utils/request';


export function useSysUserApi() {
	return {
		sysUserPage: (params: object) => {
			return request({
				url: '/api/sys/v1/user/page',
				method: 'get',
				params,
			});
		},
		sysUserAdd: (data: object) => {
			return request({
				url: '/api/sys/v1/user/add',
				method: 'post',
				data,
			});
		},
		sysUserUpdate: (data: object) => {
			return request({
				url: `/api/sys/v1/user/update`,
				method: 'put',
				data,
			});
		},
		sysUserInfo: (id: string) => {
			return request({
				url: `/api/sys/v1/user/info/${id}`,
				method: 'get',
			});
		},
		sysUserDelete: (id: string) => {
			return request({
				url: `/api/sys/v1/user/delete/${id}`,
				method: 'delete',
			});
		},
	};
}
